import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let userId = null
// try {
//   if(localStorage.mid) {
//     userId = localStorage.mid
//   }
// } catch (e) {}

export default new Vuex.Store({
  state: {
    mid: userId
  },
  mutations: {
    changeMid (state, mid) {
      state.mid = mid
      // try {
      //   localStorage.mid = mid
      // } catch (e) {}
    }
  },
  actions: {

  }
})
